Optimal. Leaf size=123 \[ \frac {a \sqrt {-c+d x} \sqrt {c+d x}}{4 c^2 x^4}+\frac {\left (4 b c^2+3 a d^2\right ) \sqrt {-c+d x} \sqrt {c+d x}}{8 c^4 x^2}+\frac {d^2 \left (4 b c^2+3 a d^2\right ) \tan ^{-1}\left (\frac {\sqrt {-c+d x} \sqrt {c+d x}}{c}\right )}{8 c^5} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {465, 105, 12,
94, 211} \begin {gather*} \frac {d^2 \left (3 a d^2+4 b c^2\right ) \text {ArcTan}\left (\frac {\sqrt {d x-c} \sqrt {c+d x}}{c}\right )}{8 c^5}+\frac {\sqrt {d x-c} \sqrt {c+d x} \left (3 a d^2+4 b c^2\right )}{8 c^4 x^2}+\frac {a \sqrt {d x-c} \sqrt {c+d x}}{4 c^2 x^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 94
Rule 105
Rule 211
Rule 465
Rubi steps
\begin {align*} \int \frac {a+b x^2}{x^5 \sqrt {-c+d x} \sqrt {c+d x}} \, dx &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{4 c^2 x^4}+\frac {1}{4} \left (4 b+\frac {3 a d^2}{c^2}\right ) \int \frac {1}{x^3 \sqrt {-c+d x} \sqrt {c+d x}} \, dx\\ &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{4 c^2 x^4}+\frac {\left (4 b c^2+3 a d^2\right ) \sqrt {-c+d x} \sqrt {c+d x}}{8 c^4 x^2}+\frac {\left (4 b c^2+3 a d^2\right ) \int \frac {d^2}{x \sqrt {-c+d x} \sqrt {c+d x}} \, dx}{8 c^4}\\ &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{4 c^2 x^4}+\frac {\left (4 b c^2+3 a d^2\right ) \sqrt {-c+d x} \sqrt {c+d x}}{8 c^4 x^2}+\frac {\left (d^2 \left (4 b c^2+3 a d^2\right )\right ) \int \frac {1}{x \sqrt {-c+d x} \sqrt {c+d x}} \, dx}{8 c^4}\\ &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{4 c^2 x^4}+\frac {\left (4 b c^2+3 a d^2\right ) \sqrt {-c+d x} \sqrt {c+d x}}{8 c^4 x^2}+\frac {\left (d^3 \left (4 b c^2+3 a d^2\right )\right ) \text {Subst}\left (\int \frac {1}{c^2 d+d x^2} \, dx,x,\sqrt {-c+d x} \sqrt {c+d x}\right )}{8 c^4}\\ &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{4 c^2 x^4}+\frac {\left (4 b c^2+3 a d^2\right ) \sqrt {-c+d x} \sqrt {c+d x}}{8 c^4 x^2}+\frac {d^2 \left (4 b c^2+3 a d^2\right ) \tan ^{-1}\left (\frac {\sqrt {-c+d x} \sqrt {c+d x}}{c}\right )}{8 c^5}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.18, size = 101, normalized size = 0.82 \begin {gather*} \frac {c \sqrt {-c+d x} \sqrt {c+d x} \left (2 a c^2+4 b c^2 x^2+3 a d^2 x^2\right )+2 d^2 \left (4 b c^2+3 a d^2\right ) x^4 \tan ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{8 c^5 x^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(226\) vs.
\(2(105)=210\).
time = 0.30, size = 227, normalized size = 1.85
method | result | size |
risch | \(-\frac {\sqrt {d x +c}\, \left (-d x +c \right ) \left (3 a \,d^{2} x^{2}+4 b \,c^{2} x^{2}+2 c^{2} a \right )}{8 c^{4} x^{4} \sqrt {d x -c}}+\frac {\left (-\frac {3 d^{4} \ln \left (\frac {-2 c^{2}+2 \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}}{x}\right ) a}{8 c^{4} \sqrt {-c^{2}}}-\frac {d^{2} \ln \left (\frac {-2 c^{2}+2 \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}}{x}\right ) b}{2 c^{2} \sqrt {-c^{2}}}\right ) \sqrt {\left (d x -c \right ) \left (d x +c \right )}}{\sqrt {d x -c}\, \sqrt {d x +c}}\) | \(192\) |
default | \(-\frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (3 \ln \left (-\frac {2 \left (c^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\right )}{x}\right ) a \,d^{4} x^{4}+4 \ln \left (-\frac {2 \left (c^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\right )}{x}\right ) b \,c^{2} d^{2} x^{4}-3 \sqrt {d^{2} x^{2}-c^{2}}\, \sqrt {-c^{2}}\, a \,d^{2} x^{2}-4 \sqrt {d^{2} x^{2}-c^{2}}\, \sqrt {-c^{2}}\, b \,c^{2} x^{2}-2 \sqrt {d^{2} x^{2}-c^{2}}\, \sqrt {-c^{2}}\, a \,c^{2}\right )}{8 c^{4} \sqrt {d^{2} x^{2}-c^{2}}\, x^{4} \sqrt {-c^{2}}}\) | \(227\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 114, normalized size = 0.93 \begin {gather*} -\frac {b d^{2} \arcsin \left (\frac {c}{d {\left | x \right |}}\right )}{2 \, c^{3}} - \frac {3 \, a d^{4} \arcsin \left (\frac {c}{d {\left | x \right |}}\right )}{8 \, c^{5}} + \frac {\sqrt {d^{2} x^{2} - c^{2}} b}{2 \, c^{2} x^{2}} + \frac {3 \, \sqrt {d^{2} x^{2} - c^{2}} a d^{2}}{8 \, c^{4} x^{2}} + \frac {\sqrt {d^{2} x^{2} - c^{2}} a}{4 \, c^{2} x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.35, size = 100, normalized size = 0.81 \begin {gather*} \frac {2 \, {\left (4 \, b c^{2} d^{2} + 3 \, a d^{4}\right )} x^{4} \arctan \left (-\frac {d x - \sqrt {d x + c} \sqrt {d x - c}}{c}\right ) + {\left (2 \, a c^{3} + {\left (4 \, b c^{3} + 3 \, a c d^{2}\right )} x^{2}\right )} \sqrt {d x + c} \sqrt {d x - c}}{8 \, c^{5} x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 325 vs.
\(2 (105) = 210\).
time = 0.58, size = 325, normalized size = 2.64 \begin {gather*} -\frac {\frac {{\left (4 \, b c^{2} d^{3} + 3 \, a d^{5}\right )} \arctan \left (\frac {{\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}}{2 \, c}\right )}{c^{5}} + \frac {2 \, {\left (4 \, b c^{2} d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{14} + 3 \, a d^{5} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{14} + 16 \, b c^{4} d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{10} + 44 \, a c^{2} d^{5} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{10} - 64 \, b c^{6} d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{6} - 176 \, a c^{4} d^{5} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{6} - 256 \, b c^{8} d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2} - 192 \, a c^{6} d^{5} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}\right )}}{{\left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4} + 4 \, c^{2}\right )}^{4} c^{4}}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 19.13, size = 1005, normalized size = 8.17 \begin {gather*} \frac {3\,a\,\sqrt {-c}\,d^4\,\ln \left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )}{8\,c^{11/2}}-\frac {\frac {b\,{\left (-c\right )}^{3/2}\,d^2}{32\,c^{9/2}}+\frac {b\,{\left (-c\right )}^{3/2}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{16\,c^{9/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}-\frac {15\,b\,{\left (-c\right )}^{3/2}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{32\,c^{9/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}}{\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+\frac {2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}+\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}}-\frac {\frac {a\,\sqrt {-c}\,d^4}{1024\,c^{11/2}}-\frac {3\,a\,\sqrt {-c}\,d^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{128\,c^{11/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}-\frac {53\,a\,\sqrt {-c}\,d^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{512\,c^{11/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}+\frac {87\,a\,\sqrt {-c}\,d^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{256\,c^{11/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}+\frac {657\,a\,\sqrt {-c}\,d^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^8}{1024\,c^{11/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^8}+\frac {121\,a\,\sqrt {-c}\,d^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{10}}{256\,c^{11/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{10}}}{\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}+\frac {4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}+\frac {6\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^8}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^8}+\frac {4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{10}}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{10}}+\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{12}}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{12}}}-\frac {b\,{\left (-c\right )}^{3/2}\,d^2\,\ln \left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )}{2\,c^{9/2}}-\frac {3\,a\,\sqrt {-c}\,d^4\,\ln \left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )}{8\,c^{11/2}}+\frac {b\,{\left (-c\right )}^{3/2}\,d^2\,\ln \left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )}{2\,c^{9/2}}-\frac {7\,a\,d^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{256\,\sqrt {-c}\,c^{9/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+\frac {a\,d^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{1024\,\sqrt {-c}\,c^{9/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}+\frac {b\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{32\,{\left (-c\right )}^{3/2}\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________